package lab02.test11;

public class Rectangle implements Printx {
    //属性：
    double side;
    double area;
    double perimeter;
    //行为：求面积，求周长
    double getArea(){
        return area=side*side;
    }
    double getPerimeter(){
        return perimeter=side*4;
    }

    @Override
    public double printMyWay() {
        return side+area+perimeter;
    }
}
